<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://cdn.jsdelivr.net/npm/dist/vue.js"></script>
</head>
<body>
<div id="app"></div>
<input type="text" v-model="num">
<button @click="num++">增加</button>
<button @click="num--">减少</button>
<h2>{{msg}}</h2>
<script type="text/javascript">
    var app = new Vue({
        el:"#app",
        data:{
            num:1,
            msg:"hello world",
        },
        created(){
            this.msg="Goodbye"
        }
    });
</script>

</body>
</html>